<?php

function role($num, $sides, $mod) {
$temp = 0;
$results = 0;
while ($temp < $num) {
$results = $results + rand(1, $sides) + $mod;
$temp++;
}
return $results;
}

?>
